const app = getApp()

const image1 = 'https://cdn.jim-nielsen.com/ios/1024/outgoings-track-expenses-2022-11-22.png'
const image2 = 'https://cdn.jim-nielsen.com/ios/256/superplanner-daily-planner-2023-01-05.png'
const image3 = 'https://cdn.jim-nielsen.com/ios/256/mercury-weather-2022-09-22.png'
const image4 = 'https://cdn.jim-nielsen.com/ios/256/nearly-departed-2022-09-22.png'
const image5 = 'https://cdn.jim-nielsen.com/ios/256/globe-3d-planet-earth-guide-2022-08-03.png'
const image6 = 'https://cdn.jim-nielsen.com/ios/256/vstack-2022-08-03.png'
const image7 = 'https://cdn.jim-nielsen.com/ios/256/worldwideweb-mobile-2022-07-14.png'
const image8 = 'https://cdn.jim-nielsen.com/ios/256/star-art-drawing-relaxing-2022-07-14.png'
const image9 = 'https://cdn.jim-nielsen.com/ios/256/tide-guide-charts-tables-2022-08-03.png'
const image10 = 'https://cdn.jim-nielsen.com/ios/256/karaoke-songs-voice-singing-2022-08-03.png'
const image11 = 'https://cdn.jim-nielsen.com/ios/256/classifier-collection-tracker-2022-09-22.png'
const image12 = 'https://cdn.jim-nielsen.com/ios/256/crossy-road-2022-09-26.png'
const image13 = 'https://cdn.jim-nielsen.com/ios/256/newsreadeck-2022-09-26.png'
const image14 = 'https://cdn.jim-nielsen.com/ios/256/readwise-reader-2023-01-05.png'

Page({

  data: {
    showModal: false,
    modal: {
      title: "功能B",
      buttons: [
        {
          image: image1,
          text: '功能A',
        },
        {
          image: image2,
          text: '功能B',
        },
        {
          image: image3,
          text: '功能C',
        },
        {
          image: image4,
          text: '功能D',
        },
        {
          image: image5,
          text: '功能E',
        },
        {
          image: image6,
          text: '功能F',
        },
        {
          image: image7,
          text: '功能G',
        },
        {
          image: image8,
          text: '功能H',
        },
        {
          image: image9,
          text: '功能I',
        },
        {
          image: image10,
          text: '功能J',
        },
        {},
        {},
      ]
    },
    banner: [
      "https://pic3.zhimg.com/80/v2-e500cef550bb87038f829a2a2c80e45e_1440w.webp",
      "https://pic3.zhimg.com/80/v2-972e9ccb82313c5cdf6a2a7f18cf5d7a_1440w.webp",
      "https://pic1.zhimg.com/80/v2-91450cd55624e1e37d137384404c64b8_1440w.webp",
      "https://pic2.zhimg.com/80/v2-8230b5ba7d0a426d899287234308ed65_1440w.webp"
    ],

    classify: [
      {
        image: image11,
        text: '功能1',
      },
      {
        image: image12,
        text: '功能2',
      },
      {
        image: image13,
        text: '功能3',
      },
      {
        image: image14,
        text: '功能4',
      },
      {
        image: image10,
        text: '功能5',
      },
    ],


    func: [
      {
        image: image1,
        text: '功能A',
      },
      {
        image: image2,
        text: '功能B',
      },
      {
        image: image3,
        text: '功能C',
      },
      {
        image: image4,
        text: '功能D',
      },
      {
        image: image5,
        text: '功能E',
      },
      {
        image: image6,
        text: '功能F',
      },
      {
        image: image7,
        text: '功能G',
      },
      {
        image: image8,
        text: '功能H',
      },
      {
        image: image9,
        text: '功能I',
      },
      {
        image: image10,
        text: '功能J',
      },
      {},
      {},
    ],
  },

  onLoad: function (options) {},

  tapShowModal(e) {
    const idx = e.currentTarget.dataset.index

    if (idx !== 1) return;

    this.setData({ showModal: true });
  },

  tapHideModal() {
    this.setData({ showModal: false });
  }
})
